<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
	xmlns:pe="http://primefaces.org/ui"
	template="/WEB-INF/templates/business/supplier/template.xhtml">

	<f:metadata>
		<f:viewParam name="bulletinId" value="#{bulletinHome3.id}"></f:viewParam>
		<f:viewParam name="supplierId" value="#{serviceSupplierHome.id}"></f:viewParam>
		<f:event listener="#{bulletinHome3.initConversation()}"
			type="preRenderView"></f:event>
		<f:viewParam name="tradeId" value="#{tradeHome.id}"></f:viewParam>
		<f:event listener="#{tradeHome.initConversation()}"
			type="preRenderView"></f:event>
	</f:metadata>
	<ui:define name="supplier_head">
		<link href="#{request.getContextPath()}/starRating/css/bootstrap.css"
			rel="stylesheet" />
		<link
			href="#{request.getContextPath()}/starRating/css/font-awesome.min.css"
			rel="stylesheet" />
		<h:outputStylesheet name="css/stylesheet.css" />
		<h:outputStylesheet name="css/public/layout.css" />
		<h:outputStylesheet name="css/public/hover-mask.css" />
		<h:outputStylesheet name="css/public/pull-down.css" />
		<h:outputStylesheet name="css/public/first-pagemain.css" />
		<h:outputStylesheet name="css/public/zhongjieminglu.css" />
		<link
			href="#{request.getContextPath()}/starRating/css/star-rating.css"
			rel="stylesheet" />
		<script type="text/javascript"
			src="#{request.getContextPath()}/starRating/js/star-rating.js"></script>
		<style type="text/css">
		.removeButton {
			float: right;
			margin-right: 20px;
		}
		
		.limitUnit {
			margin-top: 5px;
		}
		
		.table {
			border: 1px dotted #a6c9e2;
			border-collapse: collapse;
			text-align: center;
			line-height: 30px;
			width: 100%;
		}
		
		.table td {
			border: 1px solid #0094ff;
			border-collapse: collapse;
		}
		
		.label1 {
			width: 200px;
			line-height: 30px;
			text-align: right;
			padding-right: 20px;
			text-align: right;
		}
		
		.value {
			font-style: normal;
			font-size: 16px;
			line-height: 30px;
			color: #666666;
			text-align: left;
			padding-left: 20px;
			width: 80%;
		}
		
		h2 {
			text-align: center
		}
		
		.rowStyle {
			text-align: center;
			font-size: 16px
		}
	</style>
		<script type="text/javascript">

   		</script>
	</ui:define>
	<ui:define name="supplier_content">

		<h:form id="editForm">
			<p:panel header="中介基本信息符合情况概览">
				<p:panelGrid width="100%" cellpadding="5">

					<p:row>
						<p:column styleClass="label1">
							<p:outputLabel value="基本信息是否审核通过" />
						</p:column>
						<p:column styleClass="value">
							<ui:include src="/WEB-INF/templates/outputBoolean.xhtml">
								<ui:param name="booleanValue"
									value="#{serviceSupplierHome.instance.auditted}" />
							</ui:include>
						</p:column>
					</p:row>
					<p:outputPanel
						rendered="#{not empty serviceSupplierHome.instance.auditted}">
						<p:row>
							<p:column styleClass="label1">
								<p:outputLabel value="审核人" />
							</p:column>
							<p:column styleClass="value">
								#{serviceSupplierHome.instance.auditUser.cnname}
							</p:column>
						</p:row>
						<p:row>
							<p:column styleClass="label1"
								rendered="#{not serviceSupplierHome.instance.auditted}">
								<p:outputLabel value="驳回原因" />
							</p:column>
							<p:column styleClass="value"
								rendered="#{not serviceSupplierHome.instance.auditted}">
								#{serviceSupplierHome.instance.currRejectRecord.reason}
							</p:column>
						</p:row>
					</p:outputPanel>
				</p:panelGrid>
			</p:panel>
			<p:panel id="bulletinReqs" header="公告要求符合情况概览">
				<h:panelGrid columns="2" cellpadding="5"
					columnClasses="column1,column2">
					<p:outputLabel for="rootQualificationGroup" value="匹配规则" />
					<h:outputText id="rootQualificationGroup"
						style="font-size:16px;color:red"
						value="#{bulletinHome3.instance.qualificationGroup.relation.typeName}" />
				</h:panelGrid>
				<p:panel id="agentServiceReqs" header="服务事项要求"
					rendered="#{bulletinHome3.instance.qualificationGroup.getAgentServiceGroups().size() &gt; 0}"
					style="margin-bottom:10px;">
					<p:repeat var="_qualificationGroup"
						value="#{bulletinHome3.instance.qualificationGroup.getAgentServiceGroups()}"
						varStatus="_groupStatus">
						<p:panelGrid cellpadding="5"
							style=" margin-bottom: 10px;width:100%">
							<p:row style="width:100%">
								<p:column>
									<h2>服务事项要求组#{_groupStatus.index +
										1}（#{_qualificationGroup.relation.typeName}组）</h2>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<p:panelGrid cellpadding="5" style="width:100%">
										<p:row styleClass="rowStyle">
											<p:column>服务事项名称</p:column>
											<p:column>对应资质大类</p:column>
											<p:column>是否符合</p:column>
										</p:row>
										<p:repeat var="_service"
											value="#{_qualificationGroup.agentServices}">
											<p:row>
												<p:column>
													<h:outputText value="#{_service.name}" />
												</p:column>
												<p:column>
													<h:outputText value="#{_service.qualificationClass.name}" />
												</p:column>
												<p:column>
													<p:outputLabel
														rendered="#{serviceSupplierHome.checkAgentService(_service)}">
														<img src="#{resource['images/cc-check-circle.png']}"
															width="25px" height="25px" alt="" />
													</p:outputLabel>
													<p:outputLabel
														rendered="#{ not serviceSupplierHome.checkAgentService(_service)}">
														<img src="#{resource['images/icon_wrong_circle.png']}"
															width="25px" height="25px" alt="" />
													</p:outputLabel>
												</p:column>
											</p:row>
										</p:repeat>
									</p:panelGrid>
								</p:column>
							</p:row>
						</p:panelGrid>
					</p:repeat>
				</p:panel>

				<p:panel id="reqs" header="资质要求"
					rendered="#{bulletinHome3.instance.qualificationGroup.getQualificationGroups().size () &gt; 0}"
					style="margin-bottom:10px;">
					<p:repeat var="_qualificationGroup"
						value="#{bulletinHome3.instance.qualificationGroup.getQualificationGroups()}"
						varStatus="_groupStatus">
						<p:panelGrid cellpadding="5"
							style=" margin-bottom: 10px;width:100%">
							<p:row style="width:100%">
								<p:column>
									<h2>资质要求组#{_groupStatus.index +
										1}（#{_qualificationGroup.relation.typeName}组）</h2>
								</p:column>
							</p:row>
							<p:row>
								<p:column>
									<p:panelGrid cellpadding="5" style="width:100%">
										<p:row styleClass="rowStyle">
											<p:column>资质要求名称</p:column>
											<p:column>等级</p:column>
											<p:column>是否符合</p:column>
										</p:row>
										<p:repeat var="_template"
											value="#{_qualificationGroup.qualificationTemplates}">
											<c:set var="sameTemplate"
												value="#{serviceSupplierHome.getSameQualificationTemplate(_template)}" />
											<p:row>
												<p:column>
													<h:outputText value="#{_template.qualificationClass.name}" />
												</p:column>
												<p:column>
													<h:outputText value="#{_template.qualificationLevel.name}" />
												</p:column>
												<p:column>
													<p:outputPanel rendered="#{empty sameTemplate}">
														<img src="#{resource['images/icon_wrong_circle.png']}"
															width="25px" height="25px" alt="" /> 无此资质
													</p:outputPanel>
													<p:outputPanel rendered="#{not empty sameTemplate}">
														<p:outputPanel
															rendered="#{empty sameTemplate.certAuditedResult}">
															<img src="#{resource['images/icon_wrong_circle.png']}"
																width="25px" height="25px" alt="" />该资质未审核
														</p:outputPanel>
														<p:outputPanel
															rendered="#{not empty sameTemplate.certAuditedResult}">
															<p:outputPanel
																rendered="#{sameTemplate.certAuditedResult}">
																<p:outputPanel
																	rendered="#{ sameTemplate.qualificationLevel.value  &gt; _template.qualificationLevel.value}">
																	<img src="#{resource['images/icon_wrong_circle.png']}"
																		width="25px" height="25px" alt="" />资质等级不符合
																</p:outputPanel>
																<p:outputPanel
																	rendered="#{ sameTemplate.qualificationLevel.value  &lt;= _template.qualificationLevel.value}">
																	<table class="table">
																		<tr style="border: 1px dotted #a6c9e2">
																			<td>行业名称</td>
																			<td>是否符合</td>
																		</tr>
																		<p:repeat var="_sector" value="#{_template.sectors}">
																			<c:set var="sameSector"
																				value="#{serviceSupplierHome.getSameSector(_sector)}" />
																			<tr>
																				<td>#{_sector.fullSectorName}</td>
																				<td><p:outputPanel
																						rendered="#{empty sameSector}">
																						<img
																							src="#{resource['images/icon_wrong_circle.png']}"
																							width="25px" height="25px" alt="" /> 无此行业类
																						</p:outputPanel> <p:outputPanel rendered="#{not empty sameSector}">
																						<p:outputPanel
																							rendered="#{empty sameSector.certAuditedResult}">
																							<img
																								src="#{resource['images/icon_wrong_circle.png']}"
																								width="25px" height="25px" alt="" />该行业类对应的资质未审核
																							</p:outputPanel>
																						<p:outputPanel
																							rendered="#{not empty sameSector.certAuditedResult}">
																							<p:outputPanel
																								rendered="#{sameSector.certAuditedResult}">
																								<img
																									src="#{resource['images/cc-check-circle.png']}"
																									width="25px" height="25px" alt="" />
																							</p:outputPanel>
																							<p:outputPanel
																								rendered="#{not sameSector.certAuditedResult}">
																								<img
																									src="#{resource['images/icon_wrong_circle.png']}"
																									width="25px" height="25px" alt="" />该行业对应的资质审核未通过（请到我的资质查看具体原因）
																								</p:outputPanel>
																						</p:outputPanel>
																					</p:outputPanel></td>
																			</tr>
																		</p:repeat>
																	</table>
																</p:outputPanel>
															</p:outputPanel>
															<p:outputPanel
																rendered="#{not sameTemplate.certAuditedResult}">
																<img src="#{resource['images/icon_wrong_circle.png']}"
																	width="25px" height="25px" alt="" />审核未通过（请到我的资质查看具体原因）
															</p:outputPanel>
														</p:outputPanel>
													</p:outputPanel>
												</p:column>
											</p:row>
										</p:repeat>
									</p:panelGrid>
								</p:column>
							</p:row>
						</p:panelGrid>
					</p:repeat>
				</p:panel>
			</p:panel>

			<p:panel id="panel" toggleable="true" header="公告基本信息"
				style="margin-bottom:10px;">
				<p:messages id="messages" closable="true">
		       		<p:autoUpdate />
		       	</p:messages>
				 <ui:include src="/WEB-INF/templates/business/bulletinBasicInfo.xhtml" />
			</p:panel>

		</h:form>



	</ui:define>
</ui:composition>
